10. 附加数据(续)

附加数据(续)

以下是你在上一个“附加数据”部分使用的相同 notebook 。在第一个代码单元(你导入包和加载了数据的位置)下添加一个新的单元,以修复红葡萄酒数据帧中有问题的列标签。

使用 Pandas 的 rename 函数,将 total_sulfur-dioxide 列标签更改为 total_sulfur_dioxide 。你可以查看此 StackOverflow 页面 获取帮助。

然后,重新运行下面的所有单元,以附加数据帧并保存你成功组合的数据集!

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a

在上面 notebook 的末尾添加一行,以获取新组合的数据集的尺寸。使用它来回答以下问题。

QUESTION:

组合的数据帧中有多少行?

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer

QUESTION:

组合的数据帧中有多少列?

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer